//--------------------------------------------------------------------------------
// This file is a portion of the D2D1Renderer.  It is distributed
// under the MIT License, available in the root of this distribution and 
// at the following URL:
//
// http://www.opensource.org/licenses/mit-license.php
//
// Copyright (c) Mirco Timmermann
//
//--------------------------------------------------------------------------------
#pragma once

#include <d2d1.h>
#include <vector>
#include "Color.h"


class CanvasGradient {
friend class LinearGradientBrush;
friend class Direct2DContext;
friend class Graphics;

public:
	CanvasGradient();
	CanvasGradient(float x0, float y0, float x1, float y1);
	~CanvasGradient(void);

	void addColorStop(float poisition, const Color color);

private:
	std::vector<D2D1_GRADIENT_STOP> _gradientStops;

	float _x0;
	float _y0;
	float _x1;
	float _y1;

};